using System;
using NUnit.Framework;
using System.Text.RegularExpressions;

namespace Madason.MetaModel.Solution
{


	/// <summary>
	/// Summary description for TestProgramm
	/// </summary>
	[TestFixture]
	public class TestProgramm
	{
		[Test]
		public void TestRegexProject()
		{
			string test1 = @"Project(""{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"") = ""Datalayer"", ""MyTestProject.Datalayer\MyTestProject.Datalayer.csproj"", ""{254E9DC5-FCED-4248-8764-370D55E9DC4F}""";
			Match match = Program.ProjectRegex.Match(test1);
			Assert.AreEqual(true, match.Success, "Regular expression didn't match");
			string projectName = match.Groups[1].Value;
			string guid = match.Groups[3].Value;

			Assert.AreEqual("Datalayer", projectName);
			Assert.AreEqual("254E9DC5-FCED-4248-8764-370D55E9DC4F", guid);
		}
	}
}